/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package Params;

import java.awt.FileDialog;
import java.awt.Frame;
import javax.swing.JOptionPane;

/**
 *

 */
public class OptionDialog {
    public static String DialogSendFile () {
        FileDialog fd = new FileDialog(new Frame(),"Select File...",FileDialog.LOAD);
        fd.show();
        return fd.getDirectory()+fd.getFile();
    }
     public static void showDialogSendMessages(String str){
        JOptionPane.showMessageDialog(null,str,"Notice!",JOptionPane.INFORMATION_MESSAGE);
    }
    public static String DialogSaveFile(String strFileName){
        String delims = "[ .,?!]+";
        String []type = strFileName.split(delims);
        FileDialog fd = new FileDialog(new Frame(),"Save File...",FileDialog.SAVE);
        fd.setFile(strFileName);
        fd.show();
        return fd.getDirectory()+fd.getFile()+"."+type[1];
    }
}
